3.173 \(\int \frac{\left (a+b x^2\right )^2}{x \left (c+d x^2\right )} \, dx\)

Optimal. Leaf size=51 \[ \frac{a^2 \log (x)}{c}-\frac{(b c-a d)^2 \log \left (c+d x^2\right )}{2 c d^2}+\frac{b^2 x^2}{2 d} \]

[Out]

(b^2*x^2)/(2*d) + (a^2*Log[x])/c - ((b*c - a*d)^2*Log[c + d*x^2])/(2*c*d^2)

_______________________________________________________________________________________

Rubi [A]  time = 0.12011, antiderivative size = 51, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091 \[ \frac{a^2 \log (x)}{c}-\frac{(b c-a d)^2 \log \left (c+d x^2\right )}{2 c d^2}+\frac{b^2 x^2}{2 d} \]

Antiderivative was successfully verified.

[In]  Int[(a + b*x^2)^2/(x*(c + d*x^2)),x]

[Out]

(b^2*x^2)/(2*d) + (a^2*Log[x])/c - ((b*c - a*d)^2*Log[c + d*x^2])/(2*c*d^2)

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \frac{a^{2} \log{\left (x^{2} \right )}}{2 c} + \frac{\int ^{x^{2}} b^{2}\, dx}{2 d} - \frac{\left (a d - b c\right )^{2} \log{\left (c + d x^{2} \right )}}{2 c d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((b*x**2+a)**2/x/(d*x**2+c),x)

[Out]

a**2*log(x**2)/(2*c) + Integral(b**2, (x, x**2))/(2*d) - (a*d - b*c)**2*log(c +
d*x**2)/(2*c*d**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.036119, size = 50, normalized size = 0.98 \[ \frac{2 a^2 d^2 \log (x)-(b c-a d)^2 \log \left (c+d x^2\right )+b^2 c d x^2}{2 c d^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*x^2)^2/(x*(c + d*x^2)),x]

[Out]

(b^2*c*d*x^2 + 2*a^2*d^2*Log[x] - (b*c - a*d)^2*Log[c + d*x^2])/(2*c*d^2)

_______________________________________________________________________________________

Maple [A]  time = 0.008, size = 69, normalized size = 1.4 \[{\frac{{b}^{2}{x}^{2}}{2\,d}}+{\frac{{a}^{2}\ln \left ( x \right ) }{c}}-{\frac{\ln \left ( d{x}^{2}+c \right ){a}^{2}}{2\,c}}+{\frac{\ln \left ( d{x}^{2}+c \right ) ab}{d}}-{\frac{c\ln \left ( d{x}^{2}+c \right ){b}^{2}}{2\,{d}^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((b*x^2+a)^2/x/(d*x^2+c),x)

[Out]

1/2*b^2*x^2/d+a^2*ln(x)/c-1/2/c*ln(d*x^2+c)*a^2+1/d*ln(d*x^2+c)*a*b-1/2*c/d^2*ln
(d*x^2+c)*b^2

_______________________________________________________________________________________

Maxima [A]  time = 1.3582, size = 82, normalized size = 1.61 \[ \frac{b^{2} x^{2}}{2 \, d} + \frac{a^{2} \log \left (x^{2}\right )}{2 \, c} - \frac{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (d x^{2} + c\right )}{2 \, c d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)^2/((d*x^2 + c)*x),x, algorithm="maxima")

[Out]

1/2*b^2*x^2/d + 1/2*a^2*log(x^2)/c - 1/2*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*log(d*x
^2 + c)/(c*d^2)

_______________________________________________________________________________________

Fricas [A]  time = 0.235367, size = 80, normalized size = 1.57 \[ \frac{b^{2} c d x^{2} + 2 \, a^{2} d^{2} \log \left (x\right ) -{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (d x^{2} + c\right )}{2 \, c d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)^2/((d*x^2 + c)*x),x, algorithm="fricas")

[Out]

1/2*(b^2*c*d*x^2 + 2*a^2*d^2*log(x) - (b^2*c^2 - 2*a*b*c*d + a^2*d^2)*log(d*x^2
+ c))/(c*d^2)

_______________________________________________________________________________________

Sympy [A]  time = 5.13265, size = 41, normalized size = 0.8 \[ \frac{a^{2} \log{\left (x \right )}}{c} + \frac{b^{2} x^{2}}{2 d} - \frac{\left (a d - b c\right )^{2} \log{\left (\frac{c}{d} + x^{2} \right )}}{2 c d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x**2+a)**2/x/(d*x**2+c),x)

[Out]

a**2*log(x)/c + b**2*x**2/(2*d) - (a*d - b*c)**2*log(c/d + x**2)/(2*c*d**2)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.229867, size = 84, normalized size = 1.65 \[ \frac{b^{2} x^{2}}{2 \, d} + \frac{a^{2}{\rm ln}\left (x^{2}\right )}{2 \, c} - \frac{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )}{\rm ln}\left ({\left | d x^{2} + c \right |}\right )}{2 \, c d^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^2 + a)^2/((d*x^2 + c)*x),x, algorithm="giac")

[Out]

1/2*b^2*x^2/d + 1/2*a^2*ln(x^2)/c - 1/2*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*ln(abs(d
*x^2 + c))/(c*d^2)